<template>
	<view class="px-30">
		<view class="d-flex-yCenter-sb py-30" v-for="(item,index) in data" :key='index'>
			<view class="d-flex flex-d" style=",max-width: 70%;">
				<text>{{item.remark}}</text>
				<text class="font-24 mt-10 textColor999">{{$tool.time(item.addtime*1000)}}</text>
			</view>
			<text class="font-32 textColor-public">{{item.integral>0?'+':''}}{{item.integral}}</text>
		</view>
	</view>
</template>

<script>
	import {http_userIntegrel_details_view} from '@/config/apiRouter.js'
	export default {
		data() {
			return {
				page:1,
				last_page:null,
				data:[]
			}
		},
		onLoad() {
			this.httpdata()
		},
		methods: {
			httpdata(state){
				http_userIntegrel_details_view({
					page:this.page,
					limit:20
				}).then(res=>{
					this.last_page=res.data.last_page
					state?this.data=this.data.concat(res.data.data):this.data=res.data.data
				})
			},
		},
		onReachBottom() {
			if(this.page==this.last_page || this.last_page==0)return
			this.page++
			this.httpdata(true)
		},
	}
</script>

<style>

</style>
